PagingBulletedList is an ASP.NET AJAX Extender that can be attached to an ASP.NET BulletedList control and provide client-side sorted paging. TargetControl of PagingBulletedListExtender can only be a BulletedList.
PagingBulletedList Properties:
· TargetControlID - The ID of the BulletedList to page
· ClientSort - Whether or not the items should be sorted client-side
Code:
Add the scriptmanager , PagingBulletedListExtender and bullted list control
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<cc1:PagingBulletedListExtender ID="PagingBulletedListExtender1" runat="server" TargetControlID="BulletedList1"ClientSort="true">
</cc1:PagingBulletedListExtender>
<asp:BulletedList ID="BulletedList1" runat="server">
<asp:ListItem>c#</asp:ListItem>
<asp:ListItem>India</asp:ListItem>
<asp:ListItem>Pak</asp:ListItem>
<asp:ListItem>Indian</asp:ListItem>
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>1 car buy</asp:ListItem>
<asp:ListItem>3 bike</asp:ListItem>
<asp:ListItem>2 port dmaged</asp:ListItem>
<asp:ListItem>3 cycle</asp:ListItem>
<asp:ListItem>2 port are going two repair</asp:ListItem>
</asp:BulletedList>
Here item is added in the BulletedList.
Here TargetControlID is "BulletedList1" in which paging will be apply
Run the project
ClientSort property of PagingBulletedListExtender automatically sorted the value whenClientSort="true" as shown below.
When you click 1 then all value start with 1 are displayed.
When you click 2 then all value start with 2 are displayed.
Leave Comment